/*
 *
 *      Copyright (c) 2018-2025, st All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: st
 *
 */

package com.mkh.st.admin.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mkh.st.admin.api.dto.RolePageDTO;
import com.mkh.st.admin.api.entity.SysRole;
import com.mkh.st.admin.api.vo.RoleInfoVO;
import com.mkh.st.admin.api.vo.RoleTreeInfoVO;
import com.mkh.st.admin.api.vo.UserRoleMenuVO;
import com.mkh.st.common.data.datascope.DaoismBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author st
 * @since 2017-10-29
 */
@Mapper
public interface SysRoleMapper extends DaoismBaseMapper<SysRole> {


	IPage<RoleInfoVO> getPageInfo(Page page, @Param("query") RolePageDTO dto);

	List<String> getParentList(@Param("roleId") Long roleId);

    List<RoleTreeInfoVO> getRoleTree(@Param("query") RolePageDTO dto);

    List<UserRoleMenuVO> getUserRoleMenus(List<Long> roles);

	List<Long> getRoleIdsByUserId(@Param("userId") Long userId);
}
